import { defineConfig } from 'unocss';
import presetWeapp from 'unocss-preset-weapp';

const include = [/\.wxml$/];

export default defineConfig({
    content: {
        pipeline: {
            include
        }
    },
    presets: [presetWeapp()],
    separators: '__',
    rules: [
        // 基础背景颜色规则 (bg-{color})
        [/^bg-([a-z0-9]+)$/, ([, color]) => ({ 'background-color': `#${color}` })]
    ],
    shortcuts: [{ 'flex-center': 'flex justify-center items-center' }, { 'text-primary': 'text-#1AAD19' }]
});
